package edu.stanford.prpl.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

public class DateTimeUtils {

	public static final String XML_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";

	public static String formatToXMLDateTime(Date date, TimeZone timezone) {
		SimpleDateFormat df = new SimpleDateFormat(XML_DATETIME_FORMAT);
		df.setTimeZone(timezone);
		return df.format(date);
	}

}
